/**
 * 常量配置
 */
import { getEnv } from '@/utils/env';

// 存储前缀
export const STORAGE_PREFIX = getEnv('STORAGE_PREFIX', 'taro_vue3_');

// 存储键名
export const STORAGE_KEYS = {
  TOKEN: `${STORAGE_PREFIX}token`,
  REFRESH_TOKEN: `${STORAGE_PREFIX}refresh_token`,
  USER_INFO: `${STORAGE_PREFIX}user_info`,
  THEME: `${STORAGE_PREFIX}theme`,
};

// 主题
export const THEMES = {
  LIGHT: 'light',
  DARK: 'dark',
};

// 路由
export const ROUTES = {
  HOME: '/pages/index/index',
  LOGIN: '/pages/login/index',
  USER_CENTER: '/pages/user-center/index',
  PRODUCT_LIST: '/pages/product-list/index',
  PRODUCT_DETAIL: '/pages/product-detail/index',
  CART: '/pages/cart/index',
  ORDER_LIST: '/pages/order-list/index',
  ORDER_DETAIL: '/pages/order-detail/index',
  ADDRESS_LIST: '/pages/address-list/index',
  ADDRESS_EDIT: '/pages/address-edit/index',
};
